<?php
// Array representing a possible record set returned from a database
$records = array(
    array(
        'id' => 2135,
        'first_name' => 'John',
        'last_name' => 'Doe',
        'class_id' => '0705',
        'class_name' => 'master',
    ),
    array(
        'id' => 3245,
        'first_name' => 'Sally',
        'last_name' => 'Smith',
        'class_id' => '0706',
        'class_name' => 'master',
    ),
    array(
        'id' => 5342,
        'first_name' => 'Jane',
        'last_name' => 'Jones',
        'class_id' => '0705',
        'class_name' => 'hight',
    ),
    array(
        'id' => 5623,
        'first_name' => 'Peter',
        'last_name' => 'Doe',
        'class_id' => '0707',
        'class_name' => 'middle',
    ),
    array(
        'id' => 5623,
        'first_name' => 'Peter',
        'last_name' => 'Doei',
        'class_id' => '0708',
        'class_name' => 'beibi',
    )
);

$first_names = array_column($records, null, "id");
print_r($first_names);